﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<IntellectShop.Common.PageContent>>" %>
<%@ Import Namespace="IntellectShop.Web2.Code" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Html.Resource("Index") %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

	<h1><%= Html.Resource("Index") %></h1>
	<% if (Model.Any())
	{ %>
		<% foreach (var item in Model)
			{ %>
			<div style="border: 1px solid #888888; background-color:#e6e8ee;">
				<div class="headerPageContent" style="margin: 5px;">
					<p>
						<a name="id<%= item.PageContentID %>"></a>
						<strong><%= Html.LabelFor(model => item.PageContentID)%></strong>:
						<%= Html.Encode(item.PageContentID)%>
					</p>
					<p>
						<strong><%= Html.LabelFor(model => item.PageContentUniqName)%></strong>:
						<%= Html.Encode(item.PageContentUniqName)%>
					</p>
					<p>
						<strong><%= Html.LabelFor(model => item.Header)%></strong>:<br />
						<%= Html.Encode(item.Header)%>
					</p>
					<p>
						<strong><%= Html.LabelFor(model => item.CreatedBy)%></strong>:
						<%= Html.Encode(item.CreatedBy)%>
					</p>
					<p>
						<strong><%= Html.LabelFor(model => item.Created)%></strong>:
						<%= Html.Encode(item.Created)%>
					</p>
					<p>
						<strong><%= Html.Resource("Action")%></strong>:
						<%= Html.ActionLink(Html.Resource("Details"), "Details", new { pageContentID = item.PageContentID })%>
						|
						<%= Html.ActionLink(Html.Resource("Edit"), "Edit", new { pageContentID = item.PageContentID })%>
						|
						<%= Html.ActionLink(Html.Resource("Delete"), "Delete", new { pageContentID = item.PageContentID })%>
					</p>
				</div>
				<div class="bodyPageContent" style="background-color:#ffffff;">
					<table width="100%">
						<tr>
							<th>
								<%= Html.LabelFor(model => model.First().Body) %>
							</th>
						</tr>
						<tr>
							<td style="vertical-align: top;">
								<%= item.Body %>
							</td>
						</tr>
					</table>
				</div>
			</div>
		<br />
		<br />
		<% } %>
	<% } %>

</asp:Content>
